import 'package:flutterproject/generated/json/base/json_convert_content.dart';
import 'package:flutterproject/page/setting/children/child_account/data/child_account_list_bean.dart';

ChildAccountListBean $ChildAccountListBeanFromJson(Map<String, dynamic> json) {
	final ChildAccountListBean childAccountListBean = ChildAccountListBean();
	final String? mainAccount = jsonConvert.convert<String>(json['mainAccount']);
	if (mainAccount != null) {
		childAccountListBean.mainAccount = mainAccount;
	}
	final List<ChildAccountListSubAccounts>? subAccounts = jsonConvert.convertListNotNull<ChildAccountListSubAccounts>(json['subAccounts']);
	if (subAccounts != null) {
		childAccountListBean.subAccounts = subAccounts;
	}
	final int? subType = jsonConvert.convert<int>(json['subType']);
	if (subType != null) {
		childAccountListBean.subType = subType;
	}
	return childAccountListBean;
}

Map<String, dynamic> $ChildAccountListBeanToJson(ChildAccountListBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['mainAccount'] = entity.mainAccount;
	data['subAccounts'] =  entity.subAccounts?.map((v) => v.toJson()).toList();
	data['subType'] = entity.subType;
	return data;
}

ChildAccountListSubAccounts $ChildAccountListSubAccountsFromJson(Map<String, dynamic> json) {
	final ChildAccountListSubAccounts childAccountListSubAccounts = ChildAccountListSubAccounts();
	final String? mobile = jsonConvert.convert<String>(json['mobile']);
	if (mobile != null) {
		childAccountListSubAccounts.mobile = mobile;
	}
	return childAccountListSubAccounts;
}

Map<String, dynamic> $ChildAccountListSubAccountsToJson(ChildAccountListSubAccounts entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['mobile'] = entity.mobile;
	return data;
}